-- GENERATED SPELL FOR [Halefnir the Windborn] --


function spell0_30376(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(20831,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30376', 3000, 1)
end

function Sorts_30376(pUnit, Event)
local choix_sorts_30376 = math.random(0, 0)
if choix_sorts_30376 == 0 then
pUnit:RegisterEvent('spell0_30376', 1, 1)
end
end

function mob30376_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30376', math.random(1500, 3000), 1)
end

function mob30376_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30376_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30376_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30376, 1, 'mob30376_Action')
RegisterUnitEvent(30376, 2, 'mob30376_Leave')
RegisterUnitEvent(30376, 3, 'mob30376_Kill')
RegisterUnitEvent(30376, 4, 'mob30376_Die')
